import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: () => import('../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
           
                {
                    path: '/dashboard',
                    component: () => import( '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/systemManger/index',
                    component: () => import( '../views/systemManger/index'),
                    meta: { title: '业务系统管理列表'}
                },
                {
                    path: '/menuManger/index',
                    component: () => import( '../views/menuManger/index'),
                    meta: { title: '菜单管理'}
                },
                {
                    path: '/appPower/index',
                    component: () => import( '../views/appPower/index'),
                    meta: { title: 'app权限'}
                },
                {
                    path: '/functionPower/index',
                    component: () => import( '../views/functionPower/index'),
                    meta: { title: '功能权限'}
                },
                {
                    path: '/organization/index',
                    component: () => import( '../views/organization/index'),
                    meta: { title: '组织架构'}
                },
                {
                    path: '/roleManger/index',
                    component: () => import( '../views/roleManger/index'),
                    meta: { title: '角色管理'}
                },
                {
                    path: '/menuBtn/index',
                    component: () => import( '../views/menuBtn/index'),
                    meta: { title: '按钮管理'}
                },
                {
                    path: '/appFunctionClassify/index',
                    component: () => import( '../views/appFunctionClassify/index'),
                    meta: { title: 'app功能池分类'}
                },
                {
                    path: '/appFunctionManger/index',
                    component: () => import( '../views/appFunctionManger/index'),
                    meta: { title: '功能池管理'}
                },
                {
                    path: '/appFunctionManger/addOrUpdate/index',
                    component: () => import( '../views/appFunctionManger/add-or-update'),
                    meta: { title: '新增或编辑'}
                },
              
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/donate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
                    meta: { title: '支持作者' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
